<template>
    <div>
        <el-card class="url-card" style="display: flex;">
          <div v-for="(item,index) in URLData" :key="index" class="text item">
            {{(index+1)+'.域名：' + item }}
          </div>
          </el-card>
          <br>
      </div>
  
    </template>
      
      <script>
      export default {
        data() {
          return {
            URLData:["sdgasdgadf","sdgasdgadf","sdgasdgadf"],
            baseURL: "http://localhost:8000/",
            ID:[],
          }
        },
      
        mounted() {
          this.savedata();
          this.getMessages();
        },
      
        methods: {
          savedata() {
          var item = localStorage.getItem("packagename");
          if(item == undefined){
            this.ID = "";
          } else {
            var parse = JSON.parse(item);
            this.ID = parse["signature_id"];
          }
        },
          getMessages:function(){
            //记录this的地址
            let that = this
            //使用Axios实现Ajax请求
            that.axios.get(that.baseURL+"apk/permissions/"+that.ID+"/")
            .then(function(res){
              //请求成功后执行的函数
              that.URLData = res.data;
            })
            .catch(function(err){
              //请求失败后执行的函数
              console.log(err)
            })
          },
        }
      
      }
      </script>
      
      <style>
      
      </style>
    